namespace IAM.Interface.DAL.Request
{
    using IAM.Interface.Common.Context;
    using IAM.Interface.DAL.Request.Interface;
    using IAM.Interface.IDAL;
    using IAM.Interface.Model;
    using IAM.Interface.Model.ENUM;
    using System;

    public class OrganizationMgnt : AbsTransmissionParameter, IOrganizationMgnt
    {
        public bool CreateOrganize(OrganizeInfo organizeinfo)
        {
            RequestContextModel rcm = new RequestContextModel(ActionType.ORG_CREATE, OperationType.Nullity, organizeinfo, organizeinfo.GetType(), this.TranPar);
            RequestContextControl rcc = new RequestContextControl(rcm);
            string strreturn = rcc.Send();
            return (((ResponseData) rcc.Incept(strreturn)).StatusCode == 200);
        }

        public bool DeleteOrganize(OrganizeDeleteParameter organizedeleteparameter)
        {
            RequestContextModel rcm = new RequestContextModel(ActionType.ORG_DELETE, OperationType.Nullity, organizedeleteparameter, organizedeleteparameter.GetType(), this.TranPar);
            RequestContextControl rcc = new RequestContextControl(rcm);
            string strreturn = rcc.Send();
            return (((ResponseData) rcc.Incept(strreturn)).StatusCode == 200);
        }

        public bool UpdateOrganize(OrganizeInfo organizeinfo)
        {
            RequestContextModel rcm = new RequestContextModel(ActionType.ORG_UPDATE, OperationType.Nullity, organizeinfo, organizeinfo.GetType(), this.TranPar);
            RequestContextControl rcc = new RequestContextControl(rcm);
            string strreturn = rcc.Send();
            return (((ResponseData) rcc.Incept(strreturn)).StatusCode == 200);
        }
    }
}
